package day14_io.demo06_Buffered字符缓冲流;

import java.io.BufferedReader;
import java.io.FileReader;

public class Demo02_BufferedRead {
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new FileReader("E:\\csw\\Demo\\csw1\\csw3.txt"));
//        int read = br.read();
//        System.out.println((char)read);
//        String s = br.readLine();
//        System.out.println(s);
//        String s1 = br.readLine();
//        System.out.println(s1);
//        String s2 = br.readLine();
//        System.out.println(s2);
        //判断行数
        String a;
        int sum=0;
        while ((a=br.readLine())!=null){
            sum++;
        }
        br.close();
        System.out.println(sum);
    }
}
